package controllers

import (
	"ginDev/frans"
	"github.com/gin-gonic/gin"
	"net/http"
)

type MainController struct {
}

func NewMainController() *MainController {
	return &MainController{}
}

func (this *MainController) Route(frans *frans.Frans) {
	frans.Handle("GET", "/main", this.Index)
}

func (this *MainController) Index(ctx *gin.Context) gin.H {
	return gin.H{
		"code": http.StatusOK,
		"msg":  "OK",
		"data": gin.H{"data": "data"},
	}
}
